using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._Analysis
{
    /// <summary>
    /// <para>Share As Route Layers</para>
    /// <para>Shares the results of network analyses as route layer items in a portal.  A route layer includes all the information for a particular route such as the stops assigned to the route as well as the travel directions.</para>
    /// <para>将网络分析结果共享为门户中的路径图层项目。 路径图层包括特定路径的所有信息，例如分配给路径的停靠点以及行驶方向。</para>
    /// </summary>    
    [DisplayName("Share As Route Layers")]
    public class ShareAsRouteLayers : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ShareAsRouteLayers()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_network_analysis_layer">
        /// <para>Input Network Analysis Layer or  Route Data</para>
        /// <para>The network analysis layer or a .zip file containing the route data from which the route layer items are created. When the input is a network analysis layer, it should already be solved.</para>
        /// <para>网络分析图层或包含用于创建路径图层项目的路径数据的 .zip 文件。当输入是网络分析图层时，它应该已经求解。</para>
        /// </param>
        public ShareAsRouteLayers(object _in_network_analysis_layer)
        {
            this._in_network_analysis_layer = _in_network_analysis_layer;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Share As Route Layers";

        public override string CallName => "na.ShareAsRouteLayers";

        public override List<string> AcceptEnvironments => ["outputCoordinateSystem"];

        public override object[] ParameterInfo => [_in_network_analysis_layer, _summary, _tags, _route_name_prefix, _portal_folder_name, _share_with.GetGPValue(), _groups, _route_layer_items];

        /// <summary>
        /// <para>Input Network Analysis Layer or  Route Data</para>
        /// <para>The network analysis layer or a .zip file containing the route data from which the route layer items are created. When the input is a network analysis layer, it should already be solved.</para>
        /// <para>网络分析图层或包含用于创建路径图层项目的路径数据的 .zip 文件。当输入是网络分析图层时，它应该已经求解。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network Analysis Layer or  Route Data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_network_analysis_layer { get; set; }


        /// <summary>
        /// <para>Summary</para>
        /// <para>The summary used by the route layer items. The summary is displayed as part of the item information for the route layer item. If a value is not specified, default summary text—Route and directions for <route name>—is used, where <route name> is replaced with the name of the route represented by the route layer.</para>
        /// <para>路径图层项目使用的摘要。摘要将显示为路径图层项目的项目信息的一部分。如果未指定值，则使用默认摘要文本 - <route name> 的路线和方向），其中<route name> 将替换为路径图层所表示的路径名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summary")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _summary { get; set; } = null;


        /// <summary>
        /// <para>Tags</para>
        /// <para>The tags used to describe and identify the route layer items. Individual tags are separated with commas. The route name is always included as a tag even when a value is not specified.</para>
        /// <para>用于描述和标识路径图层项目的标签。各个标签用逗号分隔。即使未指定值，路由名称也始终作为标记包含在内。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tags")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _tags { get; set; } = null;


        /// <summary>
        /// <para>Route Name Prefix</para>
        /// <para>A qualifier added to the title of every route layer item. For example, a route name prefix Monday morning deliveries can be used to group all route layer items created from a route analysis performed by deliveries that should be executed on Monday morning. If a value is not specified, the title of the route layer item is created using only the route name.</para>
        /// <para>添加到每个路径图层项目标题中的限定符。例如，路径名称前缀 Monday morning delivery 可用于对应在 Monday 早上执行的投放执行的路径分析创建的所有路径图层项目进行分组。如果未指定值，则仅使用路径名称创建路径图层项目的标题。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route Name Prefix")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _route_name_prefix { get; set; } = null;


        /// <summary>
        /// <para>Portal Folder Name</para>
        /// <para>The folder in your personal online workspace where the route layer items will be created. If a folder with the specified name does not exist, a folder will be created. If a folder with the specified name exists, the items will be created in the existing folder. If a value is not specified, the route layer items are created in the root folder of your online workspace.</para>
        /// <para>个人在线工作空间中将在其中创建路径图层项目的文件夹。如果具有指定名称的文件夹不存在，则将创建一个文件夹。如果存在具有指定名称的文件夹，则将在现有文件夹中创建项目。如果未指定值，则将在在线工作空间的根文件夹中创建路径图层项目。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Portal Folder Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _portal_folder_name { get; set; } = null;


        /// <summary>
        /// <para>Share with</para>
        /// <para><xdoc>
        ///   <para>Specifies who can access the route layer items. The parameter can be specified using the following keywords:</para>
        ///   <bulletList>
        ///     <bullet_item>Everyone— The route layer items will be public and can be accessed by anyone with the URL to the items.</bullet_item><para/>
        ///     <bullet_item>Not shared— The route layer items will only be shared with the owner of the item (the user connected to the portal when the tool is run). As a result, only the item owner can access the route layers. This is the default.</bullet_item><para/>
        ///     <bullet_item>These groups— The route layer items will be shared with groups the connected user belongs to and its members. The groups are specified using the groups parameter.</bullet_item><para/>
        ///     <bullet_item>Organization— The route layer items will be shared with all authenticated users in your organization.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定谁可以访问路径图层项目。可以使用以下关键字指定该参数：</para>
        ///   <bulletList>
        ///     <bullet_item>所有人—路径图层项目将是公开的，任何具有项目 URL 的人都可以访问。</bullet_item><para/>
        ///     <bullet_item>未共享 - 路径图层项目将仅与项目的所有者（运行工具时连接到门户的用户）共享。因此，只有项目所有者才能访问路径图层。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>这些群组 - 路径图层项目将与连接的用户所属群组及其成员共享。使用 groups 参数指定组。</bullet_item><para/>
        ///     <bullet_item>组织 - 路径图层项目将与组织中所有经过身份验证的用户共享。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Share with")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _share_with_value _share_with { get; set; } = _share_with_value._MYCONTENT;

        public enum _share_with_value
        {
            /// <summary>
            /// <para>Everyone</para>
            /// <para>Everyone— The route layer items will be public and can be accessed by anyone with the URL to the items.</para>
            /// <para>所有人—路径图层项目将是公开的，任何具有项目 URL 的人都可以访问。</para>
            /// </summary>
            [Description("Everyone")]
            [GPEnumValue("EVERYBODY")]
            _EVERYBODY,

            /// <summary>
            /// <para>Organization</para>
            /// <para>Organization— The route layer items will be shared with all authenticated users in your organization.</para>
            /// <para>组织 - 路径图层项目将与组织中所有经过身份验证的用户共享。</para>
            /// </summary>
            [Description("Organization")]
            [GPEnumValue("MYORGANIZATION")]
            _MYORGANIZATION,

            /// <summary>
            /// <para>These groups</para>
            /// <para>These groups— The route layer items will be shared with groups the connected user belongs to and its members. The groups are specified using the groups parameter.</para>
            /// <para>这些群组 - 路径图层项目将与连接的用户所属群组及其成员共享。使用 groups 参数指定组。</para>
            /// </summary>
            [Description("These groups")]
            [GPEnumValue("MYGROUPS")]
            _MYGROUPS,

            /// <summary>
            /// <para>Not shared</para>
            /// <para>Not shared— The route layer items will only be shared with the owner of the item (the user connected to the portal when the tool is run). As a result, only the item owner can access the route layers. This is the default.</para>
            /// <para>未共享 - 路径图层项目将仅与项目的所有者（运行工具时连接到门户的用户）共享。因此，只有项目所有者才能访问路径图层。这是默认设置。</para>
            /// </summary>
            [Description("Not shared")]
            [GPEnumValue("MYCONTENT")]
            _MYCONTENT,

        }

        /// <summary>
        /// <para>Groups</para>
        /// <para>The list of groups with which the route layer items will be shared. This option is applicable only when the Share with parameter is set to These groups.</para>
        /// <para>将与之共享路径图层项目的群组列表。仅当“共享对象”参数设置为“这些组”时，此选项才适用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Groups")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _groups { get; set; } = null;


        /// <summary>
        /// <para>Route Layer Items</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route Layer Items")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _route_layer_items { get; set; }


        public ShareAsRouteLayers SetEnv(object outputCoordinateSystem = null)
        {
            base.SetEnv(outputCoordinateSystem: outputCoordinateSystem);
            return this;
        }

    }

}